<template>
    <div>

        <h1>课程详情</h1>

        <p>
            课程名称：{{course_list.course_name}}<br>
            课程价格：{{course_list.price}}<br>
            课程视频：<video width="300" height="240" :src="src + course_list.video" controls="controls" autoplay="autoplay" />
        </p>

    </div>
</template>

<script>
export default {
    data() {
        return {
            cid:'',
            course_list:[],
            src:'http://localhost:8000/static/upload/'
        }
    },

    mounted:function(){
        this.cid = this.$route.query.cid

        this.axios.get('http://localhost:8000/show_course/',{params:{'cid':this.cid}}).then(res=>{
            console.log(res.data)
            this.course_list = res.data
        })
    },

}
</script>

<style>

</style>